package com.freesun.autoui.product.healthcenter.pagemodel;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * desc:loginpagemodel
 * Created by yangfei on 13-12-31.
 */
public class  LoginPageModel {

    private static Logger log = LoggerFactory.getLogger(LoginPageModel.class.getClass());


    /**
     * @desc 查找登录id是否存在
     * @param driver
     */
    public  static WebElement  loginId(WebDriver driver){

        //查找对象是否存在
        WebElement loginId = driver.findElement(By.id("login_id"));
        log.warn("发现:"+loginId);
        return loginId;
    }


    /**
     * @desc 查找密码id是否存在
     * @param driver
     */
    public static WebElement passWord(WebDriver driver){

        //get passwd
        WebElement passWord = driver.findElement(By.id("passwd"));
        log.warn("发现:"+passWord);
        return passWord;
    }

    /**
     * @desc 查找密码id是否存在
     * @param driver
     */
    public static WebElement submitLogin(WebDriver driver){

        //get passwd
        WebElement logSubmit = driver.findElement(By.id("btn_submit"));
        log.warn("发现:"+logSubmit);
        return logSubmit;
    }

}
